﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace LiveShopvnext.Commodity
{
    public class CreateUpdateProductDto
    {
        [Required]
        [StringLength(40)]
        public string productName { get; set; } //产品名称

        [StringLength(40)]
        public string productSubtitle { get; set; } //产品副标题

        [Required]
        public int productDisplay { get; set; } = 1;     //产品是否显示

        [Required]
        [Range(typeof(decimal),"1.00","100000.00")]
        public decimal productSalePrice { get; set; } //产品原价

        [Required]
        [Range(typeof(decimal), "0.00", "100000.00")]
        public decimal productSPromotion { get; set; } //产品销售价

        public string productDetails { get; set; } //商品详情（富文本）

        [Required]
        [Range(typeof(decimal), "1.00", "1000.00")]
        public decimal productWeight { get; set; } //产品重量（KG)

        public int productState { get; set; } //产品是否上架
        public int productAttrName { get; set; } //产品属性
        public int productTypeId { get; set; } //产品分类
        public int productSpeciId { get; set; } //产品规范
    }
}
